Efficiently Implementing GOLOG with Answer Set Programming
نویسنده
چکیده
In this paper we investigate three different approaches to encoding domain-dependent control knowledge for Answer-Set Planning. Starting with a standard implementation of the action description language B, we add control knowledge expressed in the GOLOG logic programming language. A naive encoding, following the original definitions of Levesque et al., is shown to scale poorly. We examine two alternative codings based on the transition semantics of ConGOLOG. We show that a speed increase of multiple orders of magnitude can be obtain by compiling the GOLOG program into a finitestate machine representation. Action programming languages have a long history of use as a form of domain-dependent control knowledge in planning (Thielscher 2008). They provide a means to prune the search space of a planner by allowing the user to specify highlevel plan structure while leaving space for the planner to fill in the specific details. Many different languages have been proposed for this purpose, including temporal logic (Doherty and Kvarnstom 1999; Bacchus and Kabanza. 2000) and hierarchical task networks (Nau et al. 1999). One of the more enduring languages is GOLOG. Originally designed by Levesque et al. (1997) for use with the situation calculus (Reiter 2001), it has since been employed with other planning systems, including FF (Claßen et al. 2007) and Answer Set Planning (Son et al. 2006). In this paper we are interested in this latter problem: implementing GOLOG as an answer set program (ASP) with the action description language B (Gelfond and Lifschitz 1998). While Son et al. have already addressed this problem, we found that their implementation scaled poorly to large programs. This is a common issue with answer set programming: while the declarative semantics make specifying a problem simple, naive problem descriptions often give rise to inefficient solutions. Often a different encoding can change the solution time by orders of magnitude (Gebser et al. 2013). Particular attention has to be paid to the grounding process, whereby first order logic programs are turned into propositional logic. We find that the direct encoding of the GOLOG definition often produces grounded Copyright c � 2014, Association for the Advancement of Artificial Intelligence (www.aaai.org). All rights reserved. ASPs that increase polynomially in size with the length of the GOLOG program. A different encoding, based on the finite-state machine semantics of ConGOLOG (Giacomo, Lespérance, and Levesque 2000) can in many cases reduce this to linear growth. In what follows we first describe the basics of GOLOG and Son et al.’s original ASP encoding, then two alternatives based on ConGOLOG and finite state machines. We calculate the size of the grounded ASP for basic program structures and then we empirically evaluate each approach on a complex example program. We conclude that our two new encodings are generally superior to the original, although the best implementation is still problem dependent.
منابع مشابه
Golog+HTN: Adding time and intervals to procedural and hierarchical control knowledge
In this paper we introduce a language for expressing procedural and HTN-based domain constraints. Our language starts with features from GOLOG and HTN and extends them so that we can deal with actions with duration by being able to specify time intervals between the start (or end) of an action (or a program) and the start of another action (or program). We then discuss a planner based on the an...
متن کاملOn the Relative Expressiveness of ADL and Golog: The Last Piece in the Puzzle
Integrating agent programming languages and efficient action planning is a promising approach because it combines the expressive power of languages such as Golog with the possibility of searching for plans efficiently. In order to integrate a Golog interpreter with a planner, one has to understand, however, which part of the expressiveness of Golog can be captured by the planning language. Usin...
متن کاملPlanning with Different Forms of Domain-Dependent Control Knowledge - An Answer Set Programming Approach
In this paper we present a declarative approach to adding domain-dependent control knowledge for Answer Set Planning (ASP). Our approach allows different types of domain-dependent control knowledge such as hierarchical, temporal, or procedural knowledge to be represented and exploited in parallel, thus combining the ideas of control knowledge in HTN-planning, GOLOG-programming, and planning wit...
متن کاملAdding Time and Intervals to Procedural and Hierarchical Control Specifications
In this paper we introduce the language Golog+HTN for specifying control using procedural and HTN-based constructs together with deadlines and time restrictions. Our language starts with features from GOLOG and HTN and extends them so that we can deal with actions with duration by being able to specify time intervals between the start (or end) of an action (or a program) and the start (or end) ...
متن کاملTowards the Integration of Programming by Demonstration and Programming by Instruction using Golog: Extended Version with Proofs
We present a formal approach for combining programming by demonstration (PbD) with programming by instruction (PbI)—a largely unsolved problem. Our solution is based on the integration of two successful formalisms: version space algebras and the logic programming language Golog. Version space algebras have been successfully applied to programming by demonstration. Intuitively, a version space d...
متن کامل